package cn.com.surker.base.controller;

import cn.com.surker.base.BaseEntity;
import cn.com.surker.base.pump.entity.CastMode;
import cn.com.surker.base.pump.service.CastModeService;
import cn.com.surker.base.strength.entity.BaseStrength;
import cn.com.surker.common.AbstractController;
import cn.com.surker.enums.StateEnum;
import cn.com.surker.oa.entity.OaProductionContract;
import cn.com.surker.production.controller.ProBaseController;
import cn.com.surker.production.entity.ProductionIndent;
import cn.com.surker.production.entity.PumpDevice;
import cn.com.surker.production.service.ProductionIndentService;
import cn.com.surker.production.service.PumpConDeviceService;
import cn.com.surker.production.service.PumpDeviceService;
import cn.com.surker.spring.RestResultDto;
import cn.com.surker.system.model.CacheUser;
import cn.com.surker.util.DateUtil;
import cn.com.surker.util.StringUtils;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.transaction.RollbackException;
import java.util.Date;
import java.util.List;

/**
 * 生产任务单操作
 *
 * @author luotao
 * @date 2024/9/3
 */
@RestController
@RequestMapping("/cast/mode")
public class CastModeController extends AbstractController {

	@Resource
	protected CastModeService castModeService;

	/**
	 * 浇筑方式列表
	 *
	 * @return
	 */
	@RequestMapping(value = "/list", method = RequestMethod.POST)
	@ResponseBody
	public RestResultDto list(String name) {
		List<CastMode> list = castModeService.findList(name);
		return RestResultDto.success(list);
	}

}
